<?php
	session_start();
		if(!$_SESSION['login'] == 1 && $_SESSION['sessionid'] !== session_id()) {
		header("Location: ./");
		exit;
	}
	
	if($_SESSION['priv'] > 3) {
		$lang = $_SESSION['lang'];
		require_once("include/lang." . $lang . ".php");
		echo ERR_PRIV;
		exit;
	}
	include("include/class.mysql.php");
	include("include/layout.php");
			
	html_start();
?>



<head><script language="JavaScript" type="text/javascript">
<!-- Copyright 2005, Sandeep Gangadharan -->
<!-- For more free scripts go to http://sivamdesign.com/scripts/ -->

<!--
function smallwin() {
var numero = document.getElementById("mobile");
SW=window.open('redirect.php?mobile='+numero.value,'NewWin','toolbar=no,menubar=no,location=no,resizable=no,status=no,width=350,height=135,scrollbars=no')
                   // change the name, features and the figures of width and height above to customize the popup window.
SW.moveTo(190,240);  // change the #s at the left to adjust the left and top margins where the popup would open
}
// -->
</script>
</head>

		<br />
		<span class="conin">
		


<form method="post" action="javascript:smallwin()"  target=_BLANK >
<!--"redirect.php"-->
<?
$mobile = $_POST["mobile"];
if (!isset($_POST['submit'])) {}
?>

	<?php				
				// Edit section
												
					$MySQL->conn();
					$self =$_SESSION['self'];
					$sql = mysql_query("SELECT * FROM " . DB_PREFIX . "users WHERE id = '$self'") or die(mysql_error());
					while($row = mysql_fetch_array($sql)) {
		$_SESSION['pin']=strip_tags($row['pin']);
		$_SESSION['tel']=strip_tags($row['tel']);
			?>
			
				<legend>Escolha os dados para o seu Telefonema</legend>
				
					<br />
					Bem vindo <?=$row['uname'];?>
<fieldset>
					<br />
					<br />
					Pin
					<br />

					<?=$_SESSION['pin'];?>

					<br />
					Telefone
					<br />
					<?=$_SESSION['tel'];?>
					<br />					
						
<?}?>



<br />

<br />

<tr>
    <td><strong>Numero:</strong></td>
<br />
Numero:<input type="text" size="12" maxlength="12" name="mobile" id="mobile">:<br />
<br />

<!--<input type="submit" value="Make Call" name="submit"><br />-->
<input type="button" value="Make Call" name="submit" onclick="smallwin();"><br />

</form><br />


</fieldset>

//popuptest
<!-- <a href="javascript:smallwin();">
	Click</a> to open small window.
	</p> -->

						
	</span>
<?php	
			$MySQL->close();
		
?>



<?php	html_end();?>